import React, { useState } from 'react'
import styles from './index.css'
import { NavLink, withRouter } from "umi"

import { Menu } from 'antd'

function Aside(props) {
    const [] = useState()
    return (
        // <ul className={styles.nav}>
        //     <li><NavLink exact activeClassName={styles.active} to="/">后台管理首页</NavLink></li>
        //     <li><NavLink exact activeClassName={styles.active} to="/student">学生查询</NavLink></li>
        //     <li><NavLink exact activeClassName={styles.active} to="/student/add">添加学生</NavLink></li>
        // </ul>
        <Menu selectedKeys={[props.location.pathname]} theme='dark' mode='inline'>
            <Menu.Item key="/"><NavLink exact activeClassName={styles.active} to="/">后台管理首页</NavLink></Menu.Item>
            <Menu.SubMenu title="学生管理" key="2">
                <Menu.Item key="/student"><NavLink exact activeClassName={styles.active} to="/student">学生查询</NavLink></Menu.Item>
                <Menu.Item key="/student/add"><NavLink exact activeClassName={styles.active} to="/student/add">添加学生</NavLink></Menu.Item>
            </Menu.SubMenu>
        </Menu>
    )
}


export default withRouter(Aside)